﻿<!--
Options.xaml
Author: Daniel Sklenitzka

Copyright 2013 The CWC Team

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<Window x:Class="CkMp.Generator.UI.Options"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Options" SizeToContent="WidthAndHeight" ResizeMode="NoResize" Background="{StaticResource GradientBrush}" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
    
    <StackPanel Margin="10"  Width="300">
        <CheckBox IsChecked="{Binding AddObjectsToPreview}" Content="Show man-made objects in the preview image."/>
        
        <TextBlock Text="Which directory should the maps be saved in?" Margin="0,15,0,5"/>
        <DockPanel LastChildFill="True">
            <Button Content=" ... " DockPanel.Dock="Right" Margin="5,0,0,0" Click="OpenFileDialog"/>
            <TextBox Text="{Binding OutputDirectory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Style="{StaticResource ValidationStyle}"/>
        </DockPanel>
        <TextBlock Text="If you have Zero Hour installed on your system, you can leave this empty." Foreground="gray" TextWrapping="Wrap"/>
        
        <TextBlock Text="Under which name should the maps be saved?" Margin="0,15,0,5"/>
        <TextBox Text="{Binding MapNameTemplate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Style="{StaticResource ValidationStyle}" />

        <TextBlock Text="If you put a # in the name, it will be replaced by the map's ID, for example:" Foreground="gray" TextWrapping="Wrap" Margin="0,5"/>
        <Grid>
            <Grid.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="Foreground" Value="gray"/>
                </Style>
            </Grid.Resources>
            
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="10"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Text="Template" Grid.Row="0" Grid.Column="0" FontWeight="Bold"/>
            <TextBlock Text="Example Map Name" Grid.Row="0" Grid.Column="2" FontWeight="Bold"/>
            <TextBlock Text="Map" Grid.Row="3" Grid.Column="0"/>
            <TextBlock Text="Map (will be overwritten on every save)" Grid.Row="3" Grid.Column="2"/>
            <TextBlock Text="Map_#" Grid.Row="2" Grid.Column="0"/>
            <TextBlock Text="Map_12345" Grid.Row="2" Grid.Column="2"/>
            <TextBlock Text="#" Grid.Row="1" Grid.Column="0"/>
            <TextBlock Text="12345" Grid.Row="1" Grid.Column="2"/>
        </Grid>
        
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20,0,0">
            <Button Name="ok" Content="OK" Click="Close" Width="80" Margin="5" IsDefault="True" IsEnabled="{Binding IsValid}"/>
            <Button Name="cancel" Content="Cancel" Click="Close" Width="80" Margin="0,5" IsCancel="True"/>
        </StackPanel>
        
    </StackPanel>
</Window>
